﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;
namespace Sbook.Data
{
    public class AuthorsInfo
    {
        #region[Declare variables]
        private string _AId;
        private string _AName;
        private string _APhone;
        private string _AAddress;
        #endregion
        #region[Public Properties]
        public string AId { get { return _AId; } set { _AId = value; } }
        public string AName { get { return _AName; } set { _AName = value; } }
        public string APhone { get { return _APhone; } set { _APhone = value; } }
        public string AAddress { get { return _AAddress; } set { _AAddress = value; } }
        #endregion
        #region[Authors IDataReader]
        public AuthorsInfo AuthorsIDataReader(IDataReader dr)
        {
            Data.AuthorsInfo obj = new Data.AuthorsInfo();
            obj.AId = (dr["AId"] is DBNull) ? string.Empty : dr["AId"].ToString();
            obj.AName = (dr["AName"] is DBNull) ? string.Empty : dr["AName"].ToString();
            obj.APhone = (dr["APhone"] is DBNull) ? string.Empty : dr["APhone"].ToString();
            obj.AAddress = (dr["AAddress"] is DBNull) ? string.Empty : dr["AAddress"].ToString();
            return obj;
        }
        #endregion
    }
}